Right end point excluded range (x To_ y)

Basic and Crystal syntax.

Usage

x To_ y

x To_ y is used to specify a range of values greater than or equal to the value x, and less than but not including the value y. x and y can be of one of the types: Number, Boolean, Currency, Date, Time, DateTime, and String.

Examples

The following example is applicable to Basic syntax:

Dim BlackoutDates As Date Range

Rem Blackout period is Jan. 1, 1999 to March 31, 1999, inclusive

BlackoutDates = CDate(#1/1/1999#) To_ CDate(#4/1/1999#)

If CurrentDate In BlackoutDates Then

    formula = "Blackout"

Else

    formula = "Free to trade"

End If

If today's date is Dec. 31, 1998, then "Free to trade" is returned since it is before the Blackout period.

If today's date is Jan. 1, 1999, then "Blackout" is returned since it is within the Blackout period.

If today's date is March 31, 1999, then "Blackout" is returned since it is within the Blackout period.

If today's date is April 1, 1999, then "Free to trade" is returned since it is after the Blackout period.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com